Pseudobombax grandiflorum (Cav.) A. Robyns

Pseudobombax grandiflorum (Cav.) A. Robyns pertence à família Malvaceae e é popularmente conhecida como embiruçu. A espécie apresenta porte arbóreo com caráter decíduo e apresenta flores atrativas sendo considerada ornamental (Carvalho, 2008). Além disso, a espécie tem ampla distribuição e está presente em inselbergs, vegetação de restingas, além de florestas estacionais e ombrófilas, apresentando uma alta plasticidade fenotípica (Sultan, 2003).

Nesta atividade iremos acessar o banco de dados do GBIF para obter informações de distribuição e ocorrências dessa espécie através do software R, plotar alguns gráficos que podem ser interessantes para fins de estudo, além de saber filtrar a qualidade dos dados obtidos.

Acessando o banco de dados

Antes de acessar o banco de dados do GIBF precisamos instalar e acessar alguns pacotes. São eles: tidyverse, rgbif, scrubr, maps, leaflet.

Para já começarmos a filtrar bem nossos dados, vamos selecionar apenas ocorrências da espécie que possuam coordenadas e sem problemas geoespaciais:

library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5     v purrr   0.3.4
## v tibble  3.1.4     v dplyr   1.0.7
## v tidyr   1.1.3     v stringr 1.4.0
## v readr   2.0.1     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(rgbif)
library(maps)
## 
## Attaching package: 'maps'
## The following object is masked from 'package:purrr':
## 
##     map
embirucu_gbif <- occ_data(scientificName = "Pseudobombax grandiflorum", 
                        hasCoordinate = TRUE,
                        hasGeospatialIssue=FALSE)

DICA!

👉 Caso queira ver somente quantas ocorrências existem, sem precisar esperar carregar todo o dataset, podemos atribuir um limite. Por exemplo:

especies_gbif <- occ_data(scientificName = "Pseudobombax grandiflorum",
                          hasCoordinate = TRUE,
                          hasGeospatialIssue=FALSE,
                          limit=500)

Além disso, se sabemos que a espécie a ser investigada é distribuída mundialmente e nosso objetivo é apenas uma região em particular, podemos atribuir uma variação de coordenadas específicas para isso, como vemos a seguir:

gbif_data <- occ_data(scientificName = "Pseudobombax grandiflorum", hasCoordinate = TRUE, limit = 20000, decimalLongitude = "-10, 10", decimalLatitude = "35, 55")

Agora vamos checar as dimensões do dataset:

dim(embirucu_gbif)
## NULL
dim(embirucu_gbif$data)
## [1] 283 116

Vimos que foram encontradas 283 registros de 118 variáveis.

Ao selecionar apenas o nosso objeto, verificamos no console que o número de registros encontrados é o mesmo número de registros retornados, isto é, 283 após a filtragem. Logo, problemas geoespaciais e sem coordenadas não foram encontrados.

Porém, essa filtragem nos campos de coordenadas e problemas geoespaciais é só o começo e a quantidade de ocorrências são muito grandes. Precisamos avaliar a qualidade desses dados passando por uma filtragem mais refinada.

Filtrando a qualidade dos dados

Podemos começar pela filtragem do algoritmo do GBIF, individualizando os issues encontrados nas ocorrências e depois verificar que issues são esses no dataset baixado:

gbif_issues()
##           code                                             issue
## 1          bri                           BASIS_OF_RECORD_INVALID
## 2          ccm                        CONTINENT_COUNTRY_MISMATCH
## 3          cdc                CONTINENT_DERIVED_FROM_COORDINATES
## 4        conti                                 CONTINENT_INVALID
## 5         cdiv                                COORDINATE_INVALID
## 6        cdout                           COORDINATE_OUT_OF_RANGE
## 7        cdrep                            COORDINATE_REPROJECTED
## 8       cdrepf                    COORDINATE_REPROJECTION_FAILED
## 9       cdreps                COORDINATE_REPROJECTION_SUSPICIOUS
## 10     cdround                                COORDINATE_ROUNDED
## 11     cucdmis                       COUNTRY_COORDINATE_MISMATCH
## 12        cudc                  COUNTRY_DERIVED_FROM_COORDINATES
## 13        cuiv                                   COUNTRY_INVALID
## 14         cum                                  COUNTRY_MISMATCH
## 15      depmms                             DEPTH_MIN_MAX_SWAPPED
## 16       depnn                                 DEPTH_NON_NUMERIC
## 17     depnmet                                  DEPTH_NOT_METRIC
## 18      depunl                                    DEPTH_UNLIKELY
## 19       elmms                         ELEVATION_MIN_MAX_SWAPPED
## 20        elnn                             ELEVATION_NON_NUMERIC
## 21      elnmet                              ELEVATION_NOT_METRIC
## 22       elunl                                ELEVATION_UNLIKELY
## 23      gass84                      GEODETIC_DATUM_ASSUMED_WGS84
## 24      gdativ                            GEODETIC_DATUM_INVALID
## 25     iddativ                           IDENTIFIED_DATE_INVALID
## 26    iddatunl                          IDENTIFIED_DATE_UNLIKELY
## 27      mdativ                             MODIFIED_DATE_INVALID
## 28     mdatunl                            MODIFIED_DATE_UNLIKELY
## 29    muldativ                           MULTIMEDIA_DATE_INVALID
## 30    muluriiv                            MULTIMEDIA_URI_INVALID
## 31   preneglat                         PRESUMED_NEGATED_LATITUDE
## 32   preneglon                        PRESUMED_NEGATED_LONGITUDE
## 33     preswcd                       PRESUMED_SWAPPED_COORDINATE
## 34      rdativ                             RECORDED_DATE_INVALID
## 35       rdatm                            RECORDED_DATE_MISMATCH
## 36     rdatunl                            RECORDED_DATE_UNLIKELY
## 37    refuriiv                            REFERENCES_URI_INVALID
## 38    txmatfuz                                 TAXON_MATCH_FUZZY
## 39     txmathi                            TAXON_MATCH_HIGHERRANK
## 40    txmatnon                                  TAXON_MATCH_NONE
## 41   typstativ                               TYPE_STATUS_INVALID
## 42      zerocd                                   ZERO_COORDINATE
## 43        cdpi                      COORDINATE_PRECISION_INVALID
## 44       cdumi             COORDINATE_UNCERTAINTY_METERS_INVALID
## 45       indci                          INDIVIDUAL_COUNT_INVALID
## 46      interr                              INTERPRETATION_ERROR
## 47       iccos INDIVIDUAL_COUNT_CONFLICTS_WITH_OCCURRENCE_STATUS
## 48       osiic  OCCURRENCE_STATUS_INFERRED_FROM_INDIVIDUAL_COUNT
## 49         osu                      OCCURRENCE_STATUS_UNPARSABLE
## 50       geodi                        GEOREFERENCED_DATE_INVALID
## 51       geodu                       GEOREFERENCED_DATE_UNLIKELY
## 52      ambcol                              AMBIGUOUS_COLLECTION
## 53     ambinst                             AMBIGUOUS_INSTITUTION
## 54     colmafu                            COLLECTION_MATCH_FUZZY
## 55     colmano                             COLLECTION_MATCH_NONE
## 56     incomis                   INSTITUTION_COLLECTION_MISMATCH
## 57      inmafu                           INSTITUTION_MATCH_FUZZY
## 58      inmano                            INSTITUTION_MATCH_NONE
## 59     osifbor   OCCURRENCE_STATUS_INFERRED_FROM_BASIS_OF_RECORD
## 60     diffown                       DIFFERENT_OWNER_INSTITUTION
## 61   taxmatagg                             TAXON_MATCH_AGGREGATE
## 62    fpsrsinv                             FOOTPRINT_SRS_INVALID
## 63    fpwktinv                             FOOTPRINT_WKT_INVALID
## 64         anm                             ACCEPTED_NAME_MISSING
## 65        annu                          ACCEPTED_NAME_NOT_UNIQUE
## 66      anuidi                    ACCEPTED_NAME_USAGE_ID_INVALID
## 67    aitidinv                            ALT_IDENTIFIER_INVALID
## 68        bbmn                               BACKBONE_MATCH_NONE
## 69    basauthm                          BASIONYM_AUTHOR_MISMATCH
## 70     bibrinv                             BIB_REFERENCE_INVALID
## 71       chsun                                    CHAINED_SYNOYM
## 72      clasna                        CLASSIFICATION_NOT_APPLIED
## 73     clasroi                 CLASSIFICATION_RANK_ORDER_INVALID
## 74  conbascomb                  CONFLICTING_BASIONYM_COMBINATION
## 75      desinv                               DESCRIPTION_INVALID
## 76      disinv                              DISTRIBUTION_INVALID
## 77         hom                                           HOMONYM
## 78        minv                                MULTIMEDIA_INVALID
## 79         npm                              NAME_PARENT_MISMATCH
## 80          ns                                        NO_SPECIES
## 81       nsinv                      NOMENCLATURAL_STATUS_INVALID
## 82       onder                             ORIGINAL_NAME_DERIVED
## 83        onnu                          ORIGINAL_NAME_NOT_UNIQUE
## 84    onuidinv                    ORIGINAL_NAME_USAGE_ID_INVALID
## 85          ov                              ORTHOGRAPHIC_VARIANT
## 86          pc                                      PARENT_CYCLE
## 87        pnnu                            PARENT_NAME_NOT_UNIQUE
## 88    pnuidinv                      PARENT_NAME_USAGE_ID_INVALID
## 89          pp                                PARTIALLY_PARSABLE
## 90         pbg                            PUBLISHED_BEFORE_GENUS
## 91     rankinv                                      RANK_INVALID
## 92     relmiss                              RELATIONSHIP_MISSING
## 93       scina                         SCIENTIFIC_NAME_ASSEMBLED
## 94     spprinv                           SPECIES_PROFILE_INVALID
## 95    taxstinv                          TAXONOMIC_STATUS_INVALID
## 96    taxstmis                         TAXONOMIC_STATUS_MISMATCH
## 97      unpars                                        UNPARSABLE
## 98 vernnameinv                           VERNACULAR_NAME_INVALID
## 99  backmatagg                          BACKBONE_MATCH_AGGREGATE
##                                                                                                                                                              description
## 1                                                           The given basis of record is impossible to interpret or seriously different from the recommended vocabulary.
## 2                                                                                                                 The interpreted continent and country do not match up.
## 3                                                                            The interpreted continent is based on the coordinates, not the verbatim string information.
## 4                                                                                                                                Uninterpretable continent values found.
## 5                                                                                                Coordinate value given in some form but GBIF is unable to interpret it.
## 6                                                                                                  Coordinate has invalid lat/lon values out of their decimal max range.
## 7                                                                         The original coordinate was successfully reprojected from a different geodetic datum to WGS84.
## 8                                                                The given decimal latitude and longitude could not be reprojected to WGS84 based on the provided datum.
## 9                          Indicates successful coordinate reprojection according to provided datum, but which results in a datum shift larger than 0.1 decimal degrees.
## 10                                                                                                               Original coordinate modified by rounding to 5 decimals.
## 11                                                                                         The interpreted occurrence coordinates fall outside of the indicated country.
## 12                                                                             The interpreted country is based on the coordinates, not the verbatim string information.
## 13                                                                                                                                 Uninterpretable country values found.
## 14                                                                                        Interpreted country for dwc:country and dwc:countryCode contradict each other.
## 15                                                                                                                                               Set if supplied min>max
## 16                                                                                                                                   Set if depth is a non numeric value
## 17                                                                     Set if supplied depth is not given in the metric system, for example using feet instead of meters
## 18                                                                                                                      Set if depth is larger than 11.000m or negative.
## 19                                                                                                                                   Set if supplied min > max elevation
## 20                                                                                                                               Set if elevation is a non numeric value
## 21                                                                 Set if supplied elevation is not given in the metric system, for example using feet instead of meters
## 22                                                                                      Set if elevation is above the troposphere (17km) or below 11km (Mariana Trench).
## 23                              Indicating that the interpreted coordinates assume they are based on WGS84 datum as the datum was either not indicated or interpretable.
## 24                                                                                                                    The geodetic datum given could not be interpreted.
## 25                                                                                      The date given for dwc:dateIdentified is invalid and cant be interpreted at all.
## 26                                                                                The date given for dwc:dateIdentified is in the future or before Linnean times (1700).
## 27                                                              A (partial) invalid date is given for dc:modified, such as a non existing date, invalid zero month, etc.
## 28                                                                                         The date given for dc:modified is in the future or predates unix time (1970).
## 29                                                                                                       An invalid date is given for dc:created of a multimedia object.
## 30                                                                                                                      An invalid uri is given for a multimedia object.
## 31                                                                                                            Latitude appears to be negated, e.g. 32.3 instead of -32.3
## 32                                                                                                           Longitude appears to be negated, e.g. 32.3 instead of -32.3
## 33                                                                                                                          Latitude and longitude appear to be swapped.
## 34                                                                              A (partial) invalid date is given, such as a non existing date, invalid zero month, etc.
## 35                                                           The recording date specified as the eventDate string and the individual year, month, day are contradicting.
## 36                        The recording date is highly unlikely, falling either into the future or represents a very old date before 1600 that predates modern taxonomy.
## 37                                                                                                                            An invalid uri is given for dc:references.
## 38                                                                                   Matching to the taxonomic backbone can only be done using a fuzzy, non exact match.
## 39                                                                     Matching to the taxonomic backbone can only be done on a higher rank and not the scientific name.
## 40       Matching to the taxonomic backbone cannot be done cause there was no match at all or several matches with too little information to keep them apart (homonyms).
## 41                                                              The given type status is impossible to interpret or seriously different from the recommended vocabulary.
## 42                                                                                       Coordinate is the exact 0/0 coordinate, often indicating a bad null coordinate.
## 43                                                                                                             Indicates an invalid or very unlikely coordinatePrecision
## 44                                                                                                        Indicates an invalid or very unlikely dwc:uncertaintyInMeters.
## 45                                                                                                                  Individual count value not parsable into an integer.
## 46                                                                                An error occurred during interpretation, leaving the record interpretation incomplete.
## 47                                                                                         Example: individual count value > 0, but occurrence status is absent and etc.
## 48                                                                                                        Occurrence status was inferred from the individual count value
## 49                                                                                                         Occurrence status value can't be assigned to OccurrenceStatus
## 50                                                                                  The date given for dwc:georeferencedDate is invalid and can't be interpreted at all.
## 51                                                                             The date given for dwc:georeferencedDate is in the future or before Linnean times (1700).
## 52                                                                                                   The given collection matches with more than 1 GrSciColl collection.
## 53                                                                                                 The given institution matches with more than 1 GrSciColl institution.
## 54                                                                                                   The given collection was fuzzily matched to a GrSciColl collection.
## 55                                                                                               The given collection couldn't be matched with any GrSciColl collection.
## 56                                                                                                     The collection matched doesn't belong to the institution matched.
## 57                                                                                                 The given institution was fuzzily matched to a GrSciColl institution.
## 58                                                                                             The given institution couldn't be matched with any GrSciColl institution.
## 59                                                                                                                  Occurrence status was inferred from basis of records
## 60 The given owner institution is different than the given institution. Therefore we assume it doesn't belong to the institution and we don't link it to the occurrence.
## 61                Matching to the taxonomic backbone can only be done on a species level, but the occurrence was in fact considered a broader species aggregate/complex.
## 62                                                                                                 The Footprint Spatial Reference System given could not be interpreted
## 63                                                                                                          The Footprint Well-Known-Text given could not be interpreted
## 64                                                                                                                                     Synonym lacking an accepted name.
## 65                                                                               Synonym has a verbatim accepted name which is not unique and refers to several records.
## 66                                                                                                          The value for dwc:acceptedNameUsageID could not be resolved.
## 67                                                                          At least one alternative identifier extension record attached to this name usage is invalid.
## 68                                                                                                                 Name usage could not be matched to the GBIF backbone.
## 69                                                                     The authorship of the original name does not match the authorship in brackets of the actual name.
## 70                                                                         At least one bibliographic reference extension record attached to this name usage is invalid.
## 71                                                                                   If a synonym points to another synonym as its accepted taxon the chain is resolved.
## 72                                                                                               The denormalized classification could not be applied to the name usage.
## 73                                                                    The given ranks of the names in the classification hierarchy do not follow the hierarchy of ranks.
## 74                                                                                 There have been more than one accepted name in a homotypical basionym group of names.
## 75                                                                                     At least one description extension record attached to this name usage is invalid.
## 76                                                                                    At least one distribution extension record attached to this name usage is invalid.
## 77                                                   A not synonymized homonym exists for this name in some other backbone source which have been ignored at build time.
## 78                                                                                      At least one multimedia extension record attached to this name usage is invalid.
## 79                                               The (accepted) bi/trinomial name does not match the parent name and should be recombined into the parent genus/species.
## 80                                                           The group (currently only genera are tested) are lacking any accepted species GBIF backbone specific issue.
## 81                                                                                                                      dwc:nomenclaturalStatus could not be interpreted
## 82                     Record has a original name (basionym) relationship which was derived from name & authorship comparison, but did not exist explicitly in the data.
## 83                                                                     Record has a verbatim original name (basionym) which is not unique and refers to several records.
## 84                                                                                                          The value for dwc:originalNameUsageID could not be resolved.
## 85                                                                                                              A potential orthographic variant exists in the backbone.
## 86                                                                                 The child parent classification resulted into a cycle that needed to be resolved/cut.
## 87                                                                                  Record has a verbatim parent name which is not unique and refers to several records.
## 88                                                                                                            The value for dwc:parentNameUsageID could not be resolved.
## 89                                    The beginning of the scientific name string was parsed, but there is additional information in the string that was not understood.
## 90                                                                                            A bi/trinomial name published earlier than the parent genus was published.
## 91                                                                                                                                dwc:taxonRank could not be interpreted
## 92                                                                                                   There were problems representing all name usage relationships, i.e.
## 93                                                                     The scientific name was assembled from the individual name parts and not given as a whole string.
## 94                                                                                 At least one species profile extension record attached to this name usage is invalid.
## 95                                                                                                                          dwc:taxonomicStatus could not be interpreted
## 96                                                                                                                                                        no description
## 97                                                                   The scientific name string could not be parsed at all, but appears to be a parsable name type, i.e.
## 98                                                                                 At least one vernacular name extension record attached to this name usage is invalid.
## 99                                                     Name usage could only be matched to a GBIF backbone species, but was in fact a broader species aggregate/complex.
##          type
## 1  occurrence
## 2  occurrence
## 3  occurrence
## 4  occurrence
## 5  occurrence
## 6  occurrence
## 7  occurrence
## 8  occurrence
## 9  occurrence
## 10 occurrence
## 11 occurrence
## 12 occurrence
## 13 occurrence
## 14 occurrence
## 15 occurrence
## 16 occurrence
## 17 occurrence
## 18 occurrence
## 19 occurrence
## 20 occurrence
## 21 occurrence
## 22 occurrence
## 23 occurrence
## 24 occurrence
## 25 occurrence
## 26 occurrence
## 27 occurrence
## 28 occurrence
## 29 occurrence
## 30 occurrence
## 31 occurrence
## 32 occurrence
## 33 occurrence
## 34 occurrence
## 35 occurrence
## 36 occurrence
## 37 occurrence
## 38 occurrence
## 39 occurrence
## 40 occurrence
## 41 occurrence
## 42 occurrence
## 43 occurrence
## 44 occurrence
## 45 occurrence
## 46 occurrence
## 47 occurrence
## 48 occurrence
## 49 occurrence
## 50 occurrence
## 51 occurrence
## 52 occurrence
## 53 occurrence
## 54 occurrence
## 55 occurrence
## 56 occurrence
## 57 occurrence
## 58 occurrence
## 59 occurrence
## 60 occurrence
## 61 occurrence
## 62 occurrence
## 63 occurrence
## 64       name
## 65       name
## 66       name
## 67       name
## 68       name
## 69       name
## 70       name
## 71       name
## 72       name
## 73       name
## 74       name
## 75       name
## 76       name
## 77       name
## 78       name
## 79       name
## 80       name
## 81       name
## 82       name
## 83       name
## 84       name
## 85       name
## 86       name
## 87       name
## 88       name
## 89       name
## 90       name
## 91       name
## 92       name
## 93       name
## 94       name
## 95       name
## 96       name
## 97       name
## 98       name
## 99       name
issues_gbif <- embirucu_gbif$data$issues %>%
  strsplit(., "[,]") %>% 
  unlist() %>%
  unique()

gbif_issues() %>%
  data.frame() %>%
  filter(code%in%issues_gbif)
##        code                                            issue
## 1     conti                                CONTINENT_INVALID
## 2     cdrep                           COORDINATE_REPROJECTED
## 3   cdround                               COORDINATE_ROUNDED
## 4    gass84                     GEODETIC_DATUM_ASSUMED_WGS84
## 5  muluriiv                           MULTIMEDIA_URI_INVALID
## 6   preswcd                      PRESUMED_SWAPPED_COORDINATE
## 7    rdativ                            RECORDED_DATE_INVALID
## 8  txmatfuz                                TAXON_MATCH_FUZZY
## 9     cdumi            COORDINATE_UNCERTAINTY_METERS_INVALID
## 10    osiic OCCURRENCE_STATUS_INFERRED_FROM_INDIVIDUAL_COUNT
## 11   ambcol                             AMBIGUOUS_COLLECTION
## 12  ambinst                            AMBIGUOUS_INSTITUTION
## 13  colmafu                           COLLECTION_MATCH_FUZZY
## 14  colmano                            COLLECTION_MATCH_NONE
## 15  incomis                  INSTITUTION_COLLECTION_MISMATCH
## 16   inmafu                          INSTITUTION_MATCH_FUZZY
## 17   inmano                           INSTITUTION_MATCH_NONE
## 18  diffown                      DIFFERENT_OWNER_INSTITUTION
##                                                                                                                                                              description
## 1                                                                                                                                Uninterpretable continent values found.
## 2                                                                         The original coordinate was successfully reprojected from a different geodetic datum to WGS84.
## 3                                                                                                                Original coordinate modified by rounding to 5 decimals.
## 4                               Indicating that the interpreted coordinates assume they are based on WGS84 datum as the datum was either not indicated or interpretable.
## 5                                                                                                                       An invalid uri is given for a multimedia object.
## 6                                                                                                                           Latitude and longitude appear to be swapped.
## 7                                                                               A (partial) invalid date is given, such as a non existing date, invalid zero month, etc.
## 8                                                                                    Matching to the taxonomic backbone can only be done using a fuzzy, non exact match.
## 9                                                                                                         Indicates an invalid or very unlikely dwc:uncertaintyInMeters.
## 10                                                                                                        Occurrence status was inferred from the individual count value
## 11                                                                                                   The given collection matches with more than 1 GrSciColl collection.
## 12                                                                                                 The given institution matches with more than 1 GrSciColl institution.
## 13                                                                                                   The given collection was fuzzily matched to a GrSciColl collection.
## 14                                                                                               The given collection couldn't be matched with any GrSciColl collection.
## 15                                                                                                     The collection matched doesn't belong to the institution matched.
## 16                                                                                                 The given institution was fuzzily matched to a GrSciColl institution.
## 17                                                                                             The given institution couldn't be matched with any GrSciColl institution.
## 18 The given owner institution is different than the given institution. Therefore we assume it doesn't belong to the institution and we don't link it to the occurrence.
##          type
## 1  occurrence
## 2  occurrence
## 3  occurrence
## 4  occurrence
## 5  occurrence
## 6  occurrence
## 7  occurrence
## 8  occurrence
## 9  occurrence
## 10 occurrence
## 11 occurrence
## 12 occurrence
## 13 occurrence
## 14 occurrence
## 15 occurrence
## 16 occurrence
## 17 occurrence
## 18 occurrence

Precisamos agora selecionar as colunas que nos interessam para verificação das ocorrências:

embirucu_gbif1 <- embirucu_gbif$data %>%
  dplyr::select(scientificName, gbifID, family, taxonRank, year, decimalLatitude, decimalLongitude,
                issues, basisOfRecord, occurrenceStatus, 
                datasetName, continent, locality, habitat, institutionCode, elevation, stateProvince, individualCount)

Já podemos plotar um mapa para visualizar como nossos dados estão dispersos. Temos duas opções:

map("world", xlim = range(embirucu_gbif1$decimalLongitude), ylim = range(embirucu_gbif1$decimalLatitude)) 
points(embirucu_gbif1[ , c("decimalLongitude", "decimalLatitude")], col= "red", pch = ".")

Podemos especificar as direções das coordenadas em ‘xlim’ e ‘ylim’ acima. Entretanto, tais pontos são provavelmente centróides de células de grade (relativamente grandes) nas quais pesquisas particulares foram baseadas, então lembre-se de ajustar a resolução espacial de sua análise de acordo!

Uma outra opção e a que iremos utilizar é:

mapateste <- borders("world", colour="gray50", fill="gray50")
ggplot()+ coord_fixed()+ mapateste +
  geom_point(data = embirucu_gbif1, aes(x = decimalLongitude, y = decimalLatitude),
             colour = "darkred", size = 0.5)+
  theme_bw()

Por esse mapa, conseguimos identificar alguns pontos fora do centro de distribuição da espécie no Brasil. Vamos, então, seguir com nossa filtragem de qualidade, verificando dados únicos e checando os níveis dos fatores:

embirucu_gbif1 <- embirucu_gbif1 %>% 
  distinct()
lapply(embirucu_gbif1, unique)
## $scientificName
## [1] "Pseudobombax grandiflorum (Cav.) A.Robyns"      
## [2] "Pseudobombax grandiflorum var. grandiflorum"    
## [3] "Bombax cyathophorum (Casar.) K.Schum."          
## [4] "Pachira alba (Lodd.) Walp."                     
## [5] "Bombax decaphyllum (A.St.-Hil. & Naudin) Decne."
## [6] "Pachira decaphylla A.St.-Hil. & Naudin"         
## [7] "Bombax album (Lodd.) Bakh."                     
## 
## $gbifID
##   [1] "3079602498" "3112711271" "3112626607" "3112874575" "3307133837"
##   [6] "3337373530" "3343139586" "3343140138" "2992940307" "2992948305"
##  [11] "2873456226" "2873456248" "2873456252" "2973733306" "2973733349"
##  [16] "3032366308" "2427813740" "2597668653" "2996937829" "3069582451"
##  [21] "3343133140" "3343138238" "3108665720" "3337470781" "3381239304"
##  [26] "2991309335" "2029276949" "2427811858" "2252465925" "2873455736"
##  [31] "2873455784" "2873456891" "2873456892" "2873456899" "2873456903"
##  [36] "2873456904" "2873456918" "2027488184" "2285831795" "2998752824"
##  [41] "2464880828" "2996987644" "3343141052" "1931778709" "2996971356"
##  [46] "2996991548" "3343119648" "3343119660" "1571707190" "1621081261"
##  [51] "1621081266" "1621081279" "1899744776" "1211325292" "2996373749"
##  [56] "1087664132" "1424509641" "1944978210" "1944978438" "2464804558"
##  [61] "1424505493" "1143428405" "2329612299" "1424448266" "1213667620"
##  [66] "1423911363" "1424482056" "1123828150" "2996379201" "2464806649"
##  [71] "2995801097" "1094885304" "1094885327" "1094885349" "1094888932"
##  [76] "1094891884" "1094891889" "1094891900" "1094891913" "1094893130"
##  [81] "1094893133" "1094893137" "1086733177" "1094905361" "1094905649"
##  [86] "1094897459" "1087508278" "1094883879" "1587317810" "1978387656"
##  [91] "1099619315" "2247792975" "1089106644" "1089106631" "1087530370"
##  [96] "1095637581" "1265933180" "2381369867" "2996411617" "1077228668"
## [101] "1226936842" "1424245065" "2997773375" "1123818964" "1424247600"
## [106] "2996367692" "2996368361" "1226936849" "1424259643" "2997779378"
## [111] "1077230331" "1089106602" "1087518426" "1090658756" "1094837536"
## [116] "1086907758" "1086907764" "1090512791" "1086907962" "1123813860"
## [121] "1424405639" "2996367580" "1090507598" "3336856304" "2996371301"
## [126] "1424242564" "1094824600" "1094883751" "1123809756" "2996371366"
## [131] "1424150497" "2998083268" "1077224804" "1077602154" "1123810999"
## [136] "2996354911" "2996369182" "2996425282" "2998084969" "2998086931"
## [141] "1090504967" "1571566329" "1077443365" "1090498802" "1090498817"
## [146] "1094814128" "1094817165" "1094817218" "2998087852" "1423899502"
## [151] "1423899562" "1423940060" "2998091237" "1094808547" "2998091215"
## [156] "1094893383" "1087630287" "1423899656" "2998089171" "2998089890"
## [161] "1094901448" "1226936027" "1226936170" "2997746612" "1089113128"
## [166] "1090568325" "1123796931" "3331932737" "3336851644" "1089113136"
## [171] "1090568169" "1090568078" "2464832357" "2996376591" "1077207886"
## [176] "1090565974" "1090566737" "1094922104" "1090565456" "1949963213"
## [181] "2237722847" "2464823472" "2995799625" "1090467295" "3336855309"
## [186] "2996465475" "3336856582" "2998084205" "1077208135" "2998086945"
## [191] "1090468235" "1090479437" "1928104120" "1930059068" "2997692495"
## [196] "2997750485" "2998089047" "2004971507" "1424204442" "1424260544"
## [201] "1424260532" "1930965897" "2998068850" "1094891963" "1424151253"
## [206] "2452859781" "1424175926" "1143435000" "1226935452" "2997727901"
## [211] "1226935430" "1094887021" "1090453264" "1094740630" "1257596026"
## [216] "1322783646" "1930382721" "2998043838" "1090556971" "1094883774"
## [221] "2553473153" "2996370997" "1123788418" "2996370850" "1585337001"
## [226] "1585337410" "1089051352" "1259169033" "2996361145" "2996361167"
## [231] "1802874462" "1123787762" "2996356487" "1928706038" "1928672114"
## [236] "2998066864" "1077185665" "1094718983" "1930015138" "2998069868"
## [241] "1077185618" "1090427352" "1928266012" "2998071835" "1090595886"
## [246] "1928467348" "1929121093" "2998042864" "122909816"  "1213650581"
## [251] "1927981719" "1320210355" "1228319943" "1930056478" "1927900779"
## [256] "1928379895" "1930195087" "2998070827" "1320739430" "1929093249"
## [261] "2997743190" "1090543794" "1929152166" "1928087685" "1090538293"
## [266] "473273316"  "1090535418" "1927878087" "1929594211" "2998070826"
## [271] "2513315753" "1090512093" "1144738443" "1144738444" "1144738452"
## [276] "1228150352" "1228170266" "1228521873" "1228609184" "2269036667"
## [281] "2350500870" "2513129689" "2513316272"
## 
## $family
## [1] "Malvaceae"
## 
## $taxonRank
## [1] "SPECIES" "VARIETY"
## 
## $year
##  [1] 2021 2020 2019 2018 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007
## [16] 2006 2005 2004 2003 2002 2001 2000 1999 1998 1997 1996 1995 1993 1992 1991
## [31] 1990 1989 1988 1987 1985 1984 1983 1982 1981 1980 1977 1971 1970 1963 1957
## [46] 1955 1953 1952 1950 1948 1945 1943 1939 1915 1911   NA
## 
## $decimalLatitude
##   [1] -23.041555 -23.027450 -22.973943 -23.039612 -23.679761 -22.940069
##   [7] -20.945000 -19.696944 -22.930556 -22.931667 -15.090083 -15.083944
##  [13] -19.392694 -19.441444 -19.548056 -22.989340 -19.479722 -19.667778
##  [19] -19.479167 -19.300103 -21.769472 -12.254167 -25.446535 -22.938611
##  [25] -25.448400 -19.560556 -15.124139 -15.116667 -15.115861 -15.123194
##  [31] -15.123500 -23.846389 -12.060000 -23.326050 -20.597222 -19.636111
##  [37] -20.149444 -22.430556 -19.267986 -19.459414 -20.374383 -20.374444
##  [43] -19.800278 -19.953056  -1.950000 -17.100278 -16.559722 -10.879639
##  [49] -21.818611 -15.651111 -20.760288 -19.133889 -17.402100 -22.696944
##  [55] -22.916667 -18.898889 -11.033222 -11.015833 -14.384722 -13.713056
##  [61] -13.492500 -14.818056 -19.187778 -14.851111 -19.143333 -19.190556
##  [67] -22.760000 -22.827500 -13.566944 -13.336111 -13.733333 -13.233333
##  [73] -22.881111 -22.183333  -9.970833 -18.120250 -26.729469 -20.514444
##  [79] -23.383744 -22.968303 -27.116111 -28.620000 -12.350278 -22.937222
##  [85] -22.561389 -18.776944 -22.936944 -14.181389 -19.476861 -12.161667
##  [91] -23.460278 -23.461667 -14.416667 -18.975556 -22.642778 -13.629167
##  [97] -28.926667 -18.978333 -22.532222 -14.370556 -18.945000 -20.354167
## [103] -21.740000 -13.716667 -19.751111 -18.890278 -22.428333 -16.419167
## [109] -14.316667 -29.489700 -16.172778 -13.707500 -12.700000 -13.289444
## [115] -21.778333 -22.750270 -23.048611 -21.554722 -12.566667 -24.883333
## [121] -16.037167 -22.745410 -23.550000 -13.424722 -22.863721 -19.936111
## [127] -29.198611 -22.816667 -19.848333 -16.433333 -22.755300 -13.368611
## [133] -22.733333 -21.141944 -11.014722 -11.005278 -15.150000 -28.935278
## [139] -16.266667 -15.166667 -15.170000 -21.391389 -24.608333 -22.250000
## [145] -22.500000 -22.883260 -22.879444 -22.833333 -22.811330 -24.550000
## [151] -23.044167 -23.663056 -23.394722 -22.537500 -14.366667 -14.370000
## [157] -20.066667 -20.076667 -18.782500 -20.716667 -21.416667 -19.906111
## [163] -23.547778 -20.276667 -19.670000 -13.374275 -13.370556 -12.533333
## [169] -15.297018 -15.293333 -12.530000 -29.912222 -23.654505 -16.372109
## [175] -16.372222  44.731600 -15.483333 -19.394900 -22.750000 -22.000000
## [181] -26.030792 -26.912005 -27.102206 -27.098333 -23.003600 -23.003611
## [187] -22.694886  23.112700 -23.433900 -22.951842 -22.906960 -22.951944
## [193]  -6.174444 -14.499722 -22.482220  23.950560 -10.833900  23.000000
## [199] -19.866667 -21.816667  52.156525  -6.599100
## 
## $decimalLongitude
##   [1]  -43.507130  -43.496267  -43.203345  -43.504700  -46.558261  -43.343499
##   [7]  -40.826111  -39.931944  -42.584167  -42.601944  -44.266694  -44.266667
##  [13]  -41.131611  -41.095500  -43.990833  -42.014676  -39.737222  -39.886389
##  [19]  -39.739167  -43.626681  -41.036745  -38.818889  -49.237177  -42.962778
##  [25]  -49.234600  -43.959167  -44.244556  -44.233333  -44.242194  -44.246667
##  [31]  -48.144167  -47.340000  -51.204564  -40.421944  -48.135833  -40.312222
##  [37]  -43.244722  -40.102322  -41.202239  -41.149844  -41.149722  -40.693611
##  [43]  -43.906944  -43.900000  -39.600278  -39.239444  -37.645278  -41.047778
##  [49]  -57.213417  -56.713142  -41.572778  -50.060400  -43.937222  -42.233333
##  [55]  -41.088056  -37.734222  -37.440278  -39.034167  -38.992778  -39.049167
##  [61]  -40.775278  -39.958611  -39.376667  -40.064167  -39.956389  -42.072500
##  [67]  -41.986944  -39.038056  -39.021667  -39.023889  -38.984444  -48.492222
##  [73]  -41.393333  -37.003333  -43.343583  -49.859167  -50.086667  -47.720969
##  [79]  -47.875303  -49.179722  -49.590000  -41.576667  -42.290556  -42.290555
##  [85]  -42.172500  -40.443889  -42.291389  -39.707500  -44.010778  -39.183889
##  [91]  -46.757222  -46.757500  -39.083333  -40.769444  -44.656667  -38.930000
##  [97]  -49.679444  -40.746944  -42.346111  -39.054722  -40.800278  -45.673333
## [103]  -41.031111  -39.133333  -40.934722  -40.825833  -42.035556  -39.202222
## [109]  -55.400000  -50.100600  -38.971111  -39.014722  -39.666667  -41.354444
## [115]  -41.257500  -41.876110  -43.629722  -41.204167  -39.983333  -47.916667
## [121]  -40.057417  -41.962860  -43.766667  -46.716667  -39.001111  -38.596389
## [127]  -46.866667  -47.086761  -40.506944  -49.950278  -46.916667  -46.883333
## [133]  -40.722222  -39.050000  -46.144700  -41.884167  -46.133333  -56.590555
## [139]  -37.206389  -37.122222  -49.486111  -39.016667  -39.066667  -39.070000
## [145]  -41.094444  -47.876944  -44.566667  -42.250000  -42.018386  -42.018333
## [151]  -41.950000  -47.250000  -44.647222  -46.772500  -46.462222  -47.938889
## [157]  -41.033333  -41.046389  -41.432778  -42.016667  -46.250000  -41.666667
## [163]  -40.601944  -46.636111  -40.304444  -41.830000  -39.072989  -39.073056
## [169]  -39.075188  -39.075278  -39.080000  -51.023333  -46.621883  -39.181580
## [175]  -39.181667  -93.178000  -47.316667  -40.071853  -48.420000  -42.500000
## [181]  -48.855271  -48.662262  -48.917781  -48.917222  -43.346900  -43.346944
## [187]  -46.668492  -82.365800  -45.071100  -43.212076  -43.207669  -43.211944
## [193]  106.829444  -39.115000  -42.912500 -102.532780  -52.873100 -102.000000
## [199]  -40.533333  -47.416667    4.483532  106.801900
## 
## $issues
##  [1] "cdround"                               
##  [2] "cdround,gass84,diffown"                
##  [3] "cdround,gass84,rdativ,inmano"          
##  [4] "gass84,diffown"                        
##  [5] "gass84,ambinst"                        
##  [6] "cdround,gass84,colmafu,inmafu"         
##  [7] "cdround,gass84,muluriiv,colmafu,inmafu"
##  [8] "gass84,txmatfuz,inmano"                
##  [9] "gass84,inmano"                         
## [10] "gass84,osiic,inmano"                   
## [11] "gass84,muluriiv,rdativ,colmafu,inmafu" 
## [12] "gass84,colmafu,inmafu"                 
## [13] "cdround,gass84,inmano"                 
## [14] "cdround,gass84,rdativ,colmafu,inmafu"  
## [15] "conti,gass84,incomis,inmafu"           
## [16] "cdround,gass84"                        
## [17] "cdround,gass84,muluriiv,inmano"        
## [18] "gass84,rdativ,colmafu,inmafu"          
## [19] "gass84,incomis,inmafu"                 
## [20] "gass84,muluriiv,inmano"                
## [21] "cdround,gass84,muluriiv,rdativ,inmano" 
## [22] "gass84,preswcd,diffown"                
## [23] "cdround,gass84,incomis,inmafu"         
## [24] "gass84,colmafu"                        
## [25] "gass84,rdativ,inmano"                  
## [26] "cdrep,colmafu"                         
## [27] "cdround,gass84,osiic,ambcol,inmafu"    
## [28] "gass84,osiic,colmafu"                  
## [29] "cdround,gass84,osiic,inmano"           
## [30] "colmafu"                               
## [31] "cdround,colmafu"                       
## [32] "gass84,txmatfuz,cdumi,colmafu"         
## [33] "gass84,ambcol,inmafu"                  
## [34] "inmano"                                
## [35] "gass84,rdativ,colmano,inmafu"          
## 
## $basisOfRecord
## [1] "HUMAN_OBSERVATION"  "PRESERVED_SPECIMEN"
## 
## $occurrenceStatus
## [1] "PRESENT"
## 
## $datasetName
##  [1] "iNaturalist research-grade observations"                                              
##  [2] "VIES - Herbário Central da Universidade Federal do Espírito Santo VIES"               
##  [3] "RB - Rio de Janeiro Botanical Garden Herbarium Collection"                            
##  [4] "SPFw - Xiloteca do Instituto de Biociências da Universidade de São Paulo"             
##  [5] "HDJF - Herbário Dendrológico Jeanine Felfili"                                         
##  [6] "BHCB - Herbário da Universidade Federal de Minas Gerais"                              
##  [7] "EFC - Herbário Escola de Florestas Curitiba"                                          
##  [8] NA                                                                                     
##  [9] "HUEFS - Herbario da Universidade Estadual de Feira de Santana"                        
## [10] "UPCB - Herbário do Departamento de Botânica"                                          
## [11] "SPSF - Herbário Dom Bento José Pickel"                                                
## [12] "CEN - Herbário da Embrapa Recursos Genéticos e Biotecnologia"                         
## [13] "FUEL - Herbário da Universidade Estadual de Londrina"                                 
## [14] "HUFU - Herbarium Uberlandense"                                                        
## [15] "UEC - Herbário da Universidade Estadual de Campinas"                                  
## [16] "MBML-Herbario - Herbário Mello Leitão"                                                
## [17] "CEPEC - Herbário do Centro de Pesquisas do Cacau"                                     
## [18] "ASE - Herbário da Universidade Federal de Sergipe"                                    
## [19] "HPAN - Herbário do Pantanal \"Vali Joana Pott\""                                      
## [20] "UB - Herbário da Universidade de Brasília"                                            
## [21] "HTSA - Herbário do Trópico Semiárido"                                                 
## [22] "BOTU - Herbário Irina Delanova Gemtchújnicov"                                         
## [23] "MAC - Herbário do Instituto do Meio Ambiente do Estado de Alagoas"                    
## [24] "OUPR - Herbário \"Professor José Badini\""                                            
## [25] "HUCS - Herbário da Universidade de Caxias do Sul"                                     
## [26] "SJRP - Herbário de São José do Rio Preto"                                             
## [27] "JOI - Herbário Joinvillea"                                                            
## [28] "MBM - Herbário do Museu Botânico Municipal"                                           
## [29] "HCF - Herbário da Universidade Tecnológica Federal do Paraná Campus Campo Mourão"     
## [30] "ALCB - Herbário Alexandre Leal Costa"                                                 
## [31] "SPF - Herbário da Universidade de São Paulo"                                          
## [32] "JOIw - Xiloteca Joinvillea"                                                           
## [33] "CRI - Herbário Pe. Dr. Raulino Reitz"                                                 
## [34] "UFMT - Herbário UFMT"                                                                 
## [35] "HAS - Herbário Alarich Rudolf Holger Schultz"                                         
## [36] "IAC - Herbário do Instituto Agronômico de Campinas"                                   
## [37] "FURB - Herbário Dr. Roberto Miguel Klein"                                             
## [38] "CGMS - Herbário da Fundação Universidade Federal de Mato Grosso do Sul"               
## [39] "Vascular plants"                                                                      
## [40] "SP - Herbário do Estado \"Maria Eneyda P. Kaufmann Fidalgo\" - Coleção de Fanerógamas"
## [41] "Tropicos"                                                                             
## [42] "NMNH Extant Biology"                                                                  
## [43] "HUFSJ - Herbário da Universidade Federal de São João Del Rei"                         
## [44] "Funed-Pol - Coleção de lâminas de grãos de pólen"                                     
## [45] "MPUC - Herbário do Museu da Pontifícia Universidade Católica do Rio Grande do Sul"    
## [46] "Rapid Reference Collection"                                                           
## [47] "Marie-Victorin Herbarium (MT)"                                                        
## [48] "Negatives/Types"                                                                      
## [49] "Fruits"                                                                               
## [50] "BOTUw - Xiloteca \"Profa. Dra. Maria Aparecida Mourão Brasil\""                       
## [51] "HRCB - Herbário Rioclarense"                                                          
## 
## $continent
## [1] NA              "SOUTH_AMERICA" "NORTH_AMERICA" "ASIA"         
## [5] "EUROPE"       
## 
## $locality
##   [1] NA                                                                                                                                                                        
##   [2] "Restinga. Formação florestal não Inundada. APA Lagoa de Guanandy"                                                                                                        
##   [3] "Estação amostral 8, florestal não inundável. REBIO Comboios"                                                                                                             
##   [4] "Jaconé. Próx. a Barra Nova. Margem leste do Canal Salgado."                                                                                                              
##   [5] "Jaconé. ARIE Formigueiro do Litoral"                                                                                                                                     
##   [6] "Parque Nacional Cavernas do Peruaçu."                                                                                                                                    
##   [7] "Rio Doce (Represa), Margem Esquerda"                                                                                                                                     
##   [8] "Lapa do Baú"                                                                                                                                                             
##   [9] "Restinga arbórea da Praia do Pontal do Atalaia."                                                                                                                         
##  [10] "Praia de Cacimbas."                                                                                                                                                      
##  [11] "Reserva de Comboios, próximo ao projeto Tamar. Ponto de amostragem 7."                                                                                                   
##  [12] "Cacimbas, ponto de amostragem 6."                                                                                                                                        
##  [13] "Rio das Pedras"                                                                                                                                                          
##  [14] "Povoado do Carrapato."                                                                                                                                                   
##  [15] "Campus Jardim Botânico-UFPR"                                                                                                                                             
##  [16] "Itaipuaçu. Monumento Natural Municipal da Pedra de Itaocaia. Acesso pela Estrada de Itaipuaçu e pela Rua Cinco."                                                         
##  [17] "UFPR- passarela"                                                                                                                                                         
##  [18] "Lapinha., Próxima a pedra que delimita a trilha"                                                                                                                         
##  [19] "Estação Ecológica de Itaberá"                                                                                                                                            
##  [20] "Conglomerado: TO-581. Subunidade 1, subparcela 10, indivíduo 11."                                                                                                        
##  [21] "Campus Universitário Perobal"                                                                                                                                            
##  [22] "PEPCV. Área de transição entre Floresta periodicamente inundada e Floresta não inundável."                                                                               
##  [23] "Br 050 - Km 114"                                                                                                                                                         
##  [24] "Mestre Álvaro. Serra sede; Trilha Principal. Área de Proteção Ambiental Mestre Álvaro"                                                                                   
##  [25] "Araras. Zona de Anuência da Rebio Araras, Pedra do Oratório"                                                                                                             
##  [26] "Reserva da Vale do Rio Doce. Acero, estrada de acesso a rua do Flamengo."                                                                                                
##  [27] ". Sítio Santa Inês, próximo ao córrego Água Boa, entre 15-25 km antes de Pancas. Próximo aos primeiros pontões."                                                         
##  [28] ". Patrimônio de Santo Antonio/João do Canaã, rio mangaba, sítio mangabeira. Sítio do Seu Joãozinho. Morro da antiga Torre de Tv. Próximo a divisa com São Roque do Canaã"
##  [29] "Patrimônio de Santo Antônio do Canaã, rio mangaba, sitio do seu Joãozinho. Morro da antiga Torre de TV. Próximo a divisa com são Roque do Canaã."                        
##  [30] "São João de Petrópolis, Ifes campus Santa Teresa, mata do São Brás, acima do ponto de captação de água."                                                                 
##  [31] "Parque das Mangabeiras, Estacionamento."                                                                                                                                 
##  [32] "Parque das mangabeiras."                                                                                                                                                 
##  [33] "Conglomerado BA_1412-3-9-34"                                                                                                                                             
##  [34] "Conglomerado BA_1393-1-8-35"                                                                                                                                             
##  [35] "Assentamento Che Guevara, Mata do Dr. João"                                                                                                                              
##  [36] "RPPN Fazenda Caruara. RPPN Fazenda Caruara"                                                                                                                              
##  [37] "Estação Ecol. Serra das Araras, trilha para cachoeira \"Boca do José\", á 200m da sede"                                                                                  
##  [38] "Boca da Onça, Bodoquena"                                                                                                                                                 
##  [39] "Ponto de Caracterização em Afloramento Rochoso nº 2 para os estudos do EIA do Mineroduto Morro do Pilar/MG - Linhares/ES."                                               
##  [40] "Fazenda Canadá (CDFCBD)"                                                                                                                                                 
##  [41] "Estrada Antiga Rio-São Paulo, Km 89, nº 89001. Reserva Particular do Patrimônio Natural Jorge Monteiro."                                                                 
##  [42] "APA de Massambaba."                                                                                                                                                      
##  [43] "Afloramento rochoso granítico da torre de TV"                                                                                                                            
##  [44] "Barriguda;"                                                                                                                                                              
##  [45] "Campo Cheiroso."                                                                                                                                                         
##  [46] "Praia de Pratigi."                                                                                                                                                       
##  [47] "Entrada da cidade, propriedade particular."                                                                                                                              
##  [48] "Arboreto de Marcelo Moreira."                                                                                                                                            
##  [49] "Reserva da Vale, final da estrada Ipê-Amarelo, pasto."                                                                                                                   
##  [50] "rodovia Itabuna-Ibicaraí (BA-130), ca. 6km de Itabuna, lado esquerdo."                                                                                                   
##  [51] "Reserva da Vale, estrada da Mantegueira, chegando no refeitório."                                                                                                        
##  [52] "rodovia para Cabo Frio."                                                                                                                                                 
##  [53] "beira da estrada para a praia da Concha."                                                                                                                                
##  [54] "Estrada para Manicultura Bahia"                                                                                                                                          
##  [55] "Estrada para Maricultura Bahia"                                                                                                                                          
##  [56] "Pratigi"                                                                                                                                                                 
##  [57] "Caribé."                                                                                                                                                                 
##  [58] "Distrito de Rubião Júnior"                                                                                                                                               
##  [59] "Quissamã, Trilha nos arredores da casa de Dodói."                                                                                                                        
##  [60] "Serra-da-Mão."                                                                                                                                                           
##  [61] "Parque Estadual do Rio Preto, Trilha da Prainha. Cerrado"                                                                                                                
##  [62] "Pratinha"                                                                                                                                                                
##  [63] "Fazenda Primavera"                                                                                                                                                       
##  [64] "Represa São Luís."                                                                                                                                                       
##  [65] "Reserva de abastecimento público."                                                                                                                                       
##  [66] "Faxinal do Bepe, Parque Nacional da Serra do Itajaí."                                                                                                                    
##  [67] "Parque Nacional da Serra do Itajaí, Faxinal do Bepe"                                                                                                                     
##  [68] "Faxinal do Bepe, Parque Nacional da"                                                                                                                                     
##  [69] "Barragem do Rio São Bento"                                                                                                                                               
##  [70] "Chapada Diamantina, Lagoa de Santa Rita"                                                                                                                                 
##  [71] "Praia Seca, vegetação de restinga arbustiva densa baixa de pós-praia, anterior a Lagoa de Araruama."                                                                     
##  [72] "Área de Proteção Ambiental da Pedra do Elefante"                                                                                                                         
##  [73] "Praia Seca, vegetação arbórea de restinga entre a praia e a Lagoa de Araruama."                                                                                          
##  [74] "Praia Seca, vegetação de restinga arbustiva, entre a praia e a Lagoa de Araruama."                                                                                       
##  [75] "Litoral Sul, Mata da Botinha"                                                                                                                                            
##  [76] "Sitio Paleontológico Cuvieri. Afloramento calcário. Mata seca / semidecídua. Em solo raso sobre afloramento calcário"                                                    
##  [77] "Fazenda Retiro, ca. 18 Km de Feira de Santana na Estrada do Feijão sentido Ipirá."                                                                                       
##  [78] "Parque Estadual do Jaraguá"                                                                                                                                              
##  [79] "Parque Estadual da Serra do Conduru"                                                                                                                                     
##  [80] "Pedra redonda. Prop.Jorge Wrublewski"                                                                                                                                    
##  [81] "Fazenda Atibaia, acesso pelo Km. 258 da rodovia dos Tropeiros (SP-068)."                                                                                                 
##  [82] "Ilha de Boipeba. Arquipélago do Município de Cairu; APA Tinharé/Boipeba."                                                                                                
##  [83] "Sr. Voito"                                                                                                                                                               
##  [84] "Distrito de Peclas, Fazenda Santa Helena."                                                                                                                               
##  [85] "Fazenda Caetitú. Campo cheiroso, área florestada."                                                                                                                       
##  [86] "Rochedo,prop.: Arlindo Breda."                                                                                                                                           
##  [87] "Rochedo, propr.: Arlindo Breda"                                                                                                                                          
##  [88] "Mineração Vale do São Miguel."                                                                                                                                           
##  [89] "Restinga de Grussaí"                                                                                                                                                     
##  [90] "Litoral Sul"                                                                                                                                                             
##  [91] "Cachoeirão"                                                                                                                                                              
##  [92] "Aguas Claras, Escola Agroecológica."                                                                                                                                     
##  [93] "Reserva Biológica União"                                                                                                                                                 
##  [94] "Estrada que liga Eunápolis/Porto Seguro. RPPN Estação Veracruz. Coletas efetuadas na parcela 2 ena estrada dde acesso."                                                  
##  [95] "Parque Estadual Águas do Cuiabá."                                                                                                                                        
##  [96] "Arroio Carvalho, Estação Ecológica Estadual Aratinga."                                                                                                                   
##  [97] "Ca. 13,7Km da Ponta de Santo Antonio, Rod. para Belmonte."                                                                                                               
##  [98] "Ca. 15,5Km da BA-001 em direção a Cairú."                                                                                                                                
##  [99] "Serra de São José. Acesso pelo Povoado São José, ca. 10 km da BR 116."                                                                                                   
## [100] "ca. 13,7 km da Ponta de Santo Antônio, rodovia para Belmonte."                                                                                                           
## [101] "ca. 15,5 km da BA-001 em direção a Cairu."                                                                                                                               
## [102] "Mata do Mergulhão"                                                                                                                                                       
## [103] "Joçao Fernandes."                                                                                                                                                        
## [104] "João Fernandes."                                                                                                                                                         
## [105] "Restinga de Marambaia. Campos de provas da Marambaia (Exército), entre a linha IV e a II."                                                                               
## [106] "Mata do Funil"                                                                                                                                                           
## [107] "Fazenda Paraíso (ex-Favela)."                                                                                                                                            
## [108] "Fazenda Folha Larga."                                                                                                                                                    
## [109] "Fazenda Jabuti"                                                                                                                                                          
## [110] "Praia da Gorda."                                                                                                                                                         
## [111] "Cidade Universitária \"Armando de Salles Oliveira\" - USP. Área gramada entre a Biblioteca do Instituto de Química e Biotério."                                          
## [112] "Cidade Universitária Armando de Salles Oliveira"                                                                                                                         
## [113] "Mata da Fazenda Malabar (Fragmento M3); área total: 20ha."                                                                                                               
## [114] "IAC, Fazenda Santa Elisa, Monjolinho, Quadra Neusa Diniz, L13, P12"                                                                                                      
## [115] "Rio Saltinho (Santa Teresa-Fundão)"                                                                                                                                      
## [116] "Mata da Ribeirão da Cachoeira (Área C1); área total: 224,9ha"                                                                                                            
## [117] "IAC, Fazenda Santa Elisa, Monjolinho, Quadra Neusa Diniz, L11, P2"                                                                                                       
## [118] "IAC, Fazenda Santa Elisa, Monjolinho, Quadra dos Ipês, L12 - p6"                                                                                                         
## [119] "Mata da Fazenda Malabar, Mata da torre, (fragmento P4); área total: !2,5ha.,"                                                                                            
## [120] "São Sebastião"                                                                                                                                                           
## [121] "Extremo Sul, Estação Veracruz."                                                                                                                                          
## [122] "Bairro Pinguela"                                                                                                                                                         
## [123] "IAC, Fazenda Santa Elisa, Monjolinho, Quadra ao lado do Ripado, L6, P1"                                                                                                  
## [124] "Quintal de Elvira."                                                                                                                                                      
## [125] "Mata dos Mota"                                                                                                                                                           
## [126] "Em torno da gruta do lago Azul."                                                                                                                                         
## [127] "próximo ao povoado Cabrita/ João Bebe Água"                                                                                                                              
## [128] "próximo ao povoado Cabrita/ João Bebe Água;"                                                                                                                             
## [129] "Reserva Biológica do Mico-leão (REBIO). (IBAMA). Entrada Km 46 Rod. BA-001 Ilheus/Uma."                                                                                  
## [130] "Morro Chato."                                                                                                                                                            
## [131] "Mata do Mergulhão - Mata da Isaura"                                                                                                                                      
## [132] "Extremo Sul, caminho para estação Veracruz Florestal"                                                                                                                    
## [133] "Restinga de Iquipari Reserva Particular do Patrimônio Natural Fazenda Caruara"                                                                                           
## [134] "Reserva Biológica de Uma (REBIO). Picada do Marimbondo."                                                                                                                 
## [135] "Extremo Sul. Caminho para a Estação Veracruz."                                                                                                                           
## [136] "Reserva Biologica de Una.  Picada do Marimbondo."                                                                                                                        
## [137] "Mata do Carvão Estação Ecológica Estadual de Guaxindiba"                                                                                                                 
## [138] "IAC, Estação Experimental"                                                                                                                                               
## [139] "Parque Nacional do Itatiaia."                                                                                                                                            
## [140] "Trilha do Morro do Calcário, ponto 1000. Silva jardim/ Poço das Antas. Reserva Biológica de Poço das Antas"                                                              
## [141] "Trilha do Morro do Calcário. Reserva Biológica de Poço das Antas"                                                                                                        
## [142] "Arraial do Cabo, praia de Maçambaba."                                                                                                                                   
## [143] "Arraial do Cabo, praia de Maçambaba."                                                                                                                                    
## [144] "Mata do Centrinho, Baia formosa, estrada para a lixeira."                                                                                                                
## [145] "Mata do centrinho, Baia formosa, estrada para a lixeira."                                                                                                                
## [146] "Estação Ecológica Juréia-Itatins, Caminho do Imperador em direção a praia da Juréia"                                                                                     
## [147] "Est. Juturnaiba, esquerda - Km 1. Reserva Biológica de Poço das Antas"                                                                                                   
## [148] "Praia do Manduri."                                                                                                                                                       
## [149] "Parque Santo Dias"                                                                                                                                                       
## [150] "Cachoeira da Péroba"                                                                                                                                                     
## [151] "Campo Cheiroso, 14Km ao N Serra Grande, Rod. p/ Itacaré."                                                                                                                
## [152] "\"Campo Cheiroso\", 14 km north of Serra Grande off of road to Itacaré."                                                                                                 
## [153] "Mun. Itacare. \"Campo Cheiroso\", 14 km N of Serra Grande off of road to Itacare"                                                                                        
## [154] "\"Campo Cheiroso\", 14 km north of Serra Grande off the road to Itacaré"                                                                                                
## [155] "Campo Cheiroso\", 14 km north of Serra Grande off the road to Itacaré"                                                                                                   
## [156] "IAC, Fazenda Santa Elisa, Monjolinho"                                                                                                                                    
## [157] "Alto Três Pontões (pico da antena de rádio amador)."                                                                                                                     
## [158] "Alto 03, Portões (pico de antena de rádio amador)."                                                                                                                      
## [159] "Alto Três Pontões"                                                                                                                                                       
## [160] "Serra de Baixo"                                                                                                                                                          
## [161] "Pedra da Amendoeira"                                                                                                                                                     
## [162] "Pedra do Amendoeira"                                                                                                                                                     
## [163] "Mata Lagoa"                                                                                                                                                              
## [164] "Restinga de Macaé. RIO DE JANEIRO: Restinga de Macaé,"                                                                                                                   
## [165] "Vale do Canaã"                                                                                                                                                           
## [166] "São Paulo"                                                                                                                                                               
## [167] "Goiabeiras, UFES"                                                                                                                                                        
## [168] "Estação Biologica de Caratinga.  Atlantic forest."                                                                                                                     
## [169] "Estrada Valença/Guaibim, km 10 ap."                                                                                                                                     
## [170] "Estrada Valença/Guaibim, km 10 ap."                                                                                                                                      
## [171] "Recôncavo Sul, Mata ao NE de B. Bananeiras. Vale dos rios Paraguaçu e Jacuípe"                                                                                           
## [172] "Estrada Ilhéus/Una, km 27 do S de Olivença."                                                                                                                           
## [173] "Estrada Ilhéus/Una, km 27 do S de Olivença."                                                                                                                             
## [174] "Recôncavo Sul, Mata na B. Bananeiras. Vale dos rios Paraguaçu e Jacuípe"                                                                                                 
## [175] "Barragem de Bananeiras. Vale dos Rios Paraguaçu e Jacuipe."                                                                                                              
## [176] "Mata a NE da B. Bananeiras. Cachoeira/Bahia. Vale dos Rios. Paraguaçu e Jacuipe"                                                                                        
## [177] "Mata a NE da B. Bananeiras. Cachoeira/Bahia. Vale dos Rios. Paraguaçu e Jacuipe"                                                                                         
## [178] "."                                                                                                                                                                       
## [179] "Parque Estadual das Fontes do Ipiranga."                                                                                                                                 
## [180] "Reserva Biológica do pau-brasil."                                                                                                                                       
## [181] "Reserva Biológica do pau-brasil."                                                                                                                                        
## [182] "DF 19 0,9km S of DF2"                                                                                                                                                    
## [183] "Linhares, Vale do Rio Doce"                                                                                                                                              
## [184] "Mun. de Botucatu: 18 km N of Botucatu, (14 km E of Sao Manuel). Along the S. Manuel-Piracicaba highway. Near ex-RR station, \"13 de Maio\""                              
## [185] "Três Barras, Garuva, S. Francisco do Sul"                                                                                                                               
## [186] "Cunhas, Itajaí"                                                                                                                                                         
## [187] "Sta. Luzia, Brusque"                                                                                                                                                     
## [188] "Praia de Sernambetiba (Recreio dos Bandeirantes) ao nivel de mar."                                                                                                       
## [189] "Praia de Sernambetiba (Recreio dos Bandeirantes), near sea level."                                                                                                       
## [190] "IAC, Estação Experimental, área nativa"                                                                                                                                  
## [191] "Capital, Parque do Estado."                                                                                                                                              
## [192] "environs de La Havane"                                                                                                                                                   
## [193] "IAC, Estação Experimental (Horto)"                                                                                                                                       
## [194] "On Corcovado, Rio de Janeiro, Brazil"                                                                                                                                    
## [195] "Nictheroy, Rio de Janeiro, Brazil"                                                                                                                                       
## [196] "Estrada de Serra Grande para Itacaré. Área do inventário do plano manejo do Parque Estadual da Serra do Conduru. Mata da Capoeira."                                      
## [197] "Rio de Janeiro - Rio Janeiro/Estado do Rio de Janeiro"                                                                                                                   
## [198] "Mexique - Fl. Huayaquil."                                                                                                                                                
## [199] "Comp. Vale do Rio Doce"                                                                                                                                                  
## [200] "Parque Estadual de Porto Ferreira"                                                                                                                                       
## 
## $habitat
##  [1] NA                                 "Na restinga."                    
##  [3] "Restinga forest over white sand." "Restinga arbórea, arbustiva."   
##  [5] "Mata Costeira."                   "Mata."                           
##  [7] "Plantaçao de cacau."             "Mata secundária."               
##  [9] "Da mata."                         "nil"                             
## 
## $institutionCode
##  [1] "iNaturalist"                                             
##  [2] "VIES"                                                    
##  [3] "JBRJ"                                                    
##  [4] "USP"                                                     
##  [5] "Universidade Federal dos Vales do Jequitinhonha e Mucuri"
##  [6] "Universidade Federal de Minas Gerais"                    
##  [7] "Universidade Federal do Paraná"                          
##  [8] "SAMES"                                                   
##  [9] "UEFS"                                                    
## [10] "UFPR"                                                    
## [11] "IF"                                                      
## [12] "Cenargen"                                                
## [13] "CEN"                                                     
## [14] "Universidade Estadual de Londrina"                       
## [15] "UFU"                                                     
## [16] "UNICAMP"                                                 
## [17] "MBML"                                                    
## [18] "Comissão Executiva do Plano da Lavoura Cacaueira"        
## [19] "Universidade Federal de Sergipe"                         
## [20] "Universidade do Estado de Mato Grosso"                   
## [21] "naturgucker"                                             
## [22] "UnB"                                                     
## [23] "ASE"                                                     
## [24] "Empresa Brasileira de Pesquisa Agropecuária"             
## [25] "Universidade Estadual Paulista"                          
## [26] "IMA"                                                     
## [27] "UFOP"                                                    
## [28] "UCS"                                                     
## [29] "UNESP-IBILCE"                                            
## [30] "UNIVILLE"                                                
## [31] "MBM"                                                     
## [32] "Universidade Tecnológica Federal do Paraná"              
## [33] "HCF"                                                     
## [34] "Universidade Federal da Bahia"                           
## [35] "SPF"                                                     
## [36] "CRI"                                                     
## [37] "HUENF"                                                   
## [38] "MAC"                                                     
## [39] "UFMT"                                                    
## [40] "Fundação Zoobotânica do Rio Grande do Sul"               
## [41] "IAC"                                                     
## [42] "Universidade Regional de Blumenau"                       
## [43] "Universidade Federal de Mato Grosso do Sul"              
## [44] "NY"                                                      
## [45] "Instituto de Botânica"                                   
## [46] "MO"                                                      
## [47] "US"                                                      
## [48] "UFSJ"                                                    
## [49] "FUNED"                                                   
## [50] "PUCRS"                                                   
## [51] "FTG"                                                     
## [52] "F"                                                       
## [53] "Université de Montréal Biodiversity Centre"              
## [54] NA                                                        
## [55] "G"                                                       
## [56] "UNESP-IBB"                                               
## 
## $elevation
##  [1]      NA     8.0   701.0   667.0   666.0   116.0    89.0   719.0    58.0
## [10]     7.0     6.0   777.0   910.0   737.0   707.0   710.0   724.0   699.0
## [19]   700.0   111.0   113.0  1043.0    60.0   213.0   219.0   295.0  1107.0
## [28]     9.0   223.0   490.0   850.0   110.0     3.0    26.0   900.0    30.0
## [37]   100.0    50.0    13.0     0.0    12.0   590.0   554.0   608.0   479.0
## [46] -4999.5   680.0   450.0   815.0   819.0   120.0   300.0   504.0    49.0
## [55]   130.0   500.0   720.0     4.0    56.0    18.0    31.0   178.0    17.5
## [64]   717.0   653.0   808.0  1390.0  1000.0    39.0   855.0  1050.0   400.0
## [73]   800.0    10.0    40.0    80.0   550.0   380.0
## 
## $stateProvince
##  [1] "Rio de Janeiro"     "São Paulo"          "Espírito Santo"    
##  [4] "Minas Gerais"       "Bahia"              "Paraná"            
##  [7] "Sp"                 "To"                 "Tocantins"         
## [10] "Sergipe"            "Mato Grosso"        NA                  
## [13] "Goiás"              "Alagoas"            "Santa Catarina"    
## [16] "Sc"                 "Mg"                 "Rio Grande do Sul" 
## [19] "Mato Grosso do Sul" "Rs"                 "São Paulo"        
## [22] "Distrito Federal"   "Espírito Santo"    "La Habana"         
## [25] "Java"               "Zuid-Holland"      
## 
## $individualCount
## [1] NA  3  1  2

Bom, tudo certo, aqui terminamos a filtragem de issues pelo algoritmo do gbif. Podemos ainda continuar nosso controle de qualidade dos dados a partir de investigações individuais. Isso será necessário, uma vez que os dados geralmente possuem erros, então a inspeção precisa ser minunciosa.

O próximo passo, então, é verificar registros únicos e remover os que possuem zeros ou são ausentes :

names(embirucu_gbif1)
##  [1] "scientificName"   "gbifID"           "family"           "taxonRank"       
##  [5] "year"             "decimalLatitude"  "decimalLongitude" "issues"          
##  [9] "basisOfRecord"    "occurrenceStatus" "datasetName"      "continent"       
## [13] "locality"         "habitat"          "institutionCode"  "elevation"       
## [17] "stateProvince"    "individualCount"
sort(unique(embirucu_gbif1$individualCount))
## [1] 1 2 3
sort(unique(embirucu_gbif1$occurrenceStatus))
## [1] "PRESENT"

Verificamos que não tem nenhum ponto que corresponde a zero e não há nenhuma ocorrência contendo “ausente”. Entretanto, pode estar sendo exibido em outras línguas. Vamos averiguar nas línguas mais comumns para essa espécie. Além disso, temos que nos lembrar que o R discrimina letras maiúsculas de minúsculas:

absence_rows <- which(embirucu_gbif1$individualCount == 0 | embirucu_gbif1$occurrenceStatus %in% c("absent", "Absent", "ABSENT", "ausente", "Ausente", "AUSENTE"))
length(absence_rows)
## [1] 0
if (length(absence_rows) > 0) {
  embirucu_gbif1 <- embirucu_gbif1[-absence_rows, ]
}

Assim, conseguimos ver que realmente não há ocorrências registradas como “ausente”.

Nossa investigação de erros ou problemas nos dados não pode parar por aqui. Precisamos sempre buscar meios de filtrar a qualidade dos dados baixados.

Filtragens mais refinadas

Pacote scrubr

Vamos realizar a filtragem agora a partir do pacote scrubr, investigando coordenadas incompletas, imprecisas, impossíveis, improváveis e duplicadas:

library(scrubr)
## Registered S3 method overwritten by 'hoardr':
##   method           from
##   print.cache_info httr
nrow(embirucu_gbif1)
## [1] 283

Identificamos 283 ocorrências. Aplicando a filtragem das coordenadas, temos:

embirucu_gbif1 <- coord_incomplete(coord_imprecise(coord_impossible(coord_unlikely(dedup(embirucu_gbif1)))))
## Assuming 'decimalLatitude' is latitude
## Assuming 'decimalLongitude' is longitude
nrow(embirucu_gbif1)
## [1] 236

Agora temos 236 ocorrências. Foram eliminadas, então, 47 ocorrências com problemas nas coordenadas.

Pacote CoordinateCleaner

Um outro procedimento para controle de qualidade dos dados, e muito comum, é a utilização do pacote CoordinateCleaner. Esse pacote possui a função clean_coordinates, a qual envolve um grande conjunto de etapas de limpeza automatizadas para sinalizar erros comuns a coleções biológicas.

Vamos utilizar esse pacote e marcar como flags os dados suspeitos através de alguns testes:

library(CoordinateCleaner)

flags <- clean_coordinates(
  x = embirucu_gbif1,
  lon = "decimalLongitude",
  lat = "decimalLatitude",
  species = "scientificName",
  tests = c("equal", "gbif","zeros", "seas", "capitals", "centroids", "institutions"))
## Testing coordinate validity
## Flagged 0 records.
## Testing equal lat/lon
## Flagged 0 records.
## Testing zero coordinates
## Flagged 0 records.
## Testing country capitals
## Flagged 2 records.
## Testing country centroids
## Flagged 1 records.
## Testing sea coordinates
## OGR data source with driver: ESRI Shapefile 
## Source: "C:\Users\vanes\AppData\Local\Temp\Rtmpyaj8jh", layer: "ne_50m_land"
## with 1420 features
## It has 3 fields
## Integer64 fields read as strings:  scalerank
## Flagged 27 records.
## Testing GBIF headquarters, flagging records around Copenhagen
## Flagged 0 records.
## Testing biodiversity institutions
## Flagged 1 records.
## Flagged 31 of 236 records, EQ = 0.13.
summary(flags)
##     .val     .equ     .zer     .cap     .cen     .sea     .gbf    .inst 
##        0        0        0        2        1       27        0        1 
## .summary 
##       31
plot(flags, lon = "decimalLongitude", lat = "decimalLatitude")

Os testes identificaram cerca de 13% de ocorrências com flags. Além disso, como vemos no mapa, algumas flags estão distantes do centro de distribuição geográfica da espécie. É necessário uma investigação mais profunda sobre essas ocorrências, mas por hora, vamos apenas remover essas flags para continuarmos esta atividade.

dat_cl <- embirucu_gbif1[flags$.summary,]

#Dados marcados com flags
dat_fl <- embirucu_gbif1[!flags$.summary,]

Sobraram, então, 205 ocorrências filtradas. Vamos salvar esses dados.

Por fim, vamos averiguar a quantidade de registros por estado:

embirucu_gbif1 %>% drop_na(stateProvince) %>% count(stateProvince, sort = TRUE) %>% ggplot(aes(x = reorder(stateProvince, 
                                                                                              n), y = n, fill = stateProvince)) + geom_bar(stat = "identity", show.legend = FALSE) + 
  labs(x = "Estados", y = "Número de ocorrências") + coord_flip()

Como podemos ver, o estado da Bahia possui o maior registro de ocorrências da espécie Pseudobombax grandiflorum, seguida dos estados do Rio de Janeiro e Espírito Santo. Esse tipo de gráfico se torna interessante para análises mais profundas sobre o habitat da espécie, além de informar regiões com maior quantidade de informações e outras que precisam ser melhor investigadas.

Mapas interativos

Pacote leaflet

Plotamos alguns mapas do decorrer do processo para termos uma ideia da distribuição dos dados da espécie. Porém, esses mapas não são interativos. Para realizar mapas interativos e, posteriormente, passar para a versão em html, podemos utilizar o pacote leaflet.

Os procedimentos são os mesmos para filtragem de dados, selecionamos as variáveis a serem investigadas e plotamos o mapa como mostra o script abaixo:

library(tidyverse)
library(rgbif)

# Verificamos as ocorrências
embirucu_gbif_ok <- occ_data(scientificName = "Pseudobombax grandiflorum", 
                           hasCoordinate = TRUE,
                           hasGeospatialIssue = FALSE)
# checando alguns issues
issues_gbif <- embirucu_gbif_ok$data$issues %>% 
  unique() %>% 
  strsplit(., "[,]") %>% 
  unlist()

gbif_issues() %>% 
  data.frame() %>% 
  filter(code %in% issues_gbif)
##        code                                            issue
## 1     conti                                CONTINENT_INVALID
## 2     cdrep                           COORDINATE_REPROJECTED
## 3   cdround                               COORDINATE_ROUNDED
## 4    gass84                     GEODETIC_DATUM_ASSUMED_WGS84
## 5  muluriiv                           MULTIMEDIA_URI_INVALID
## 6   preswcd                      PRESUMED_SWAPPED_COORDINATE
## 7    rdativ                            RECORDED_DATE_INVALID
## 8  txmatfuz                                TAXON_MATCH_FUZZY
## 9     cdumi            COORDINATE_UNCERTAINTY_METERS_INVALID
## 10    osiic OCCURRENCE_STATUS_INFERRED_FROM_INDIVIDUAL_COUNT
## 11   ambcol                             AMBIGUOUS_COLLECTION
## 12  ambinst                            AMBIGUOUS_INSTITUTION
## 13  colmafu                           COLLECTION_MATCH_FUZZY
## 14  colmano                            COLLECTION_MATCH_NONE
## 15  incomis                  INSTITUTION_COLLECTION_MISMATCH
## 16   inmafu                          INSTITUTION_MATCH_FUZZY
## 17   inmano                           INSTITUTION_MATCH_NONE
## 18  diffown                      DIFFERENT_OWNER_INSTITUTION
##                                                                                                                                                              description
## 1                                                                                                                                Uninterpretable continent values found.
## 2                                                                         The original coordinate was successfully reprojected from a different geodetic datum to WGS84.
## 3                                                                                                                Original coordinate modified by rounding to 5 decimals.
## 4                               Indicating that the interpreted coordinates assume they are based on WGS84 datum as the datum was either not indicated or interpretable.
## 5                                                                                                                       An invalid uri is given for a multimedia object.
## 6                                                                                                                           Latitude and longitude appear to be swapped.
## 7                                                                               A (partial) invalid date is given, such as a non existing date, invalid zero month, etc.
## 8                                                                                    Matching to the taxonomic backbone can only be done using a fuzzy, non exact match.
## 9                                                                                                         Indicates an invalid or very unlikely dwc:uncertaintyInMeters.
## 10                                                                                                        Occurrence status was inferred from the individual count value
## 11                                                                                                   The given collection matches with more than 1 GrSciColl collection.
## 12                                                                                                 The given institution matches with more than 1 GrSciColl institution.
## 13                                                                                                   The given collection was fuzzily matched to a GrSciColl collection.
## 14                                                                                               The given collection couldn't be matched with any GrSciColl collection.
## 15                                                                                                     The collection matched doesn't belong to the institution matched.
## 16                                                                                                 The given institution was fuzzily matched to a GrSciColl institution.
## 17                                                                                             The given institution couldn't be matched with any GrSciColl institution.
## 18 The given owner institution is different than the given institution. Therefore we assume it doesn't belong to the institution and we don't link it to the occurrence.
##          type
## 1  occurrence
## 2  occurrence
## 3  occurrence
## 4  occurrence
## 5  occurrence
## 6  occurrence
## 7  occurrence
## 8  occurrence
## 9  occurrence
## 10 occurrence
## 11 occurrence
## 12 occurrence
## 13 occurrence
## 14 occurrence
## 15 occurrence
## 16 occurrence
## 17 occurrence
## 18 occurrence
# selecionando variáveis de interesse
embirucu <- embirucu_gbif_ok$data %>%
  dplyr::select(scientificName, decimalLatitude, decimalLongitude) %>% 
  distinct()

library(leaflet)

#Conferindo o mapa
embirucu %>% 
  leaflet() %>% 
  addTiles() %>% 
  addMarkers(~decimalLongitude,
             ~decimalLatitude, label = ~as.character(decimalLongitude))

A seguir, precisamos ajustar as configurações do mapa, como cores da paleta, inserção e posição da legenda:

pal <- colorFactor(palette = "magma", domain = unique(embirucu$scientificName))

embirucu %>% 
  leaflet() %>% 
  addTiles() %>% 
  addCircleMarkers(~decimalLongitude,
                   ~decimalLatitude,
                   radius = 5,
                   label = ~as.character(scientificName),
                   color = ~pal(embirucu$scientificName),
                   stroke = FALSE, fillOpacity = 0.5) %>% 
  addLegend('bottomright', 
            colors = unique(pal(embirucu$scientificName)), 
            labels = unique(embirucu$scientificName),
            title = 'Espécie',
            opacity = 0.5)

Através desse mapa conseguimos visualizar registros diferentes para a mesma espécie distribuídas em outros pontos fora do Brasil.

Pacote Plotly

Utilizaremos o pacote Plotly para averiguar a distribuição de ocorrências em certas latitudes:

library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
cc <- embirucu %>% 
  mutate(lat = round(decimalLatitude)) %>% 
  group_by(lat, scientificName) %>%
  summarise(occ = length(scientificName)) %>%
  ggplot(aes(y = occ, x = lat, color = scientificName)) +
  geom_point() +
  geom_smooth() +
  theme_classic() +
  labs(x = "latitude", y = 'ocorrências')
## `summarise()` has grouped output by 'lat'. You can override using the `.groups` argument.
ggplotly(cc)
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : span too small. fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : at -11.28
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : radius 0.0784
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : all data on boundary of neighborhood. make span bigger
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : pseudoinverse used at -11.28
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : neighborhood radius 0.28
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : reciprocal condition number 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : at 45.28
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : radius 0.0784
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : all data on boundary of neighborhood. make span bigger
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : There are other near singularities as well. 0.0784
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : zero-width neighborhood. make span bigger

## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : zero-width neighborhood. make span bigger
## Warning: Computation failed in `stat_smooth()`:
## NA/NaN/Inf em chamada de função externa (argumento 5)

Aqui observamos que as ocorrências estão mais presentes em latitudes negativas, que corresponde ao Hemisfério Sul, basta passar o cursor nos pontos para exibir as informações.

Um recurso interessante para ser utilizado nas consultas de dados abertos, é a observação das tendências no registro de ocorrências através do tempo. Usaremos o pacote ggplot2 e o plotly para desenharmos um gráfico de linha interativo que nos mostra a quantidade de ocorrências para a espécie no decorrer dos anos.

library(tidyverse)
library(plotly)

embirucu_gbif1 %>% count(year)
## # A tibble: 52 x 2
##     year     n
##    <int> <int>
##  1  1911     1
##  2  1915     2
##  3  1943     1
##  4  1948     1
##  5  1950     1
##  6  1952     3
##  7  1953     2
##  8  1955     1
##  9  1957     1
## 10  1970     3
## # ... with 42 more rows
out <- embirucu_gbif1 %>% drop_na(year) %>% count(year) %>% ggplot(aes(x = year, 
                                                                   y = n, group = 1)) + xlim(1910, 2022) + geom_line()
plotly::ggplotly(out)

Os registros datam desde 1911 e teve maior pico em 2006, com 15 ocorrências registradas. Esse gráfico pode ser interessante para checar as tendências da espécie e a quantidade de informação que possa estar disponível no banco de dados.


Referências bibliográficas

Carvalho, P., 2008. Embiruçu (Pseudobombax grandiflorum). Embrapa Florestas-Circular Técnica (INFOTECA-E).

Sultan, S.E., 2003. Phenotypic plasticity in plants: a case study in ecological development. Evolution & development, 5(1), 25-33.